﻿using CrawlerForm;
using System.Text.RegularExpressions;

class Test {

    public static void test() {
        Crawler crawler = new Crawler("http://www.cnblogs.com/dstang2000/");
        Match match = Regex.Match(crawler.StartURL, Crawler.urlParseRegex);
        if (match.Length == 0) return;
        string host = match.Groups["host"].Value;
        crawler.HostFilter = "^" + host + "$";
        crawler.FileFilter = ".(html?|aspx|jsp|php)$|^[^.]*$";
        crawler.Start();
    }

    public static void Main(String[] args) {
        test();
    }
}